package funjava;

/**
 * Created by judasnow on 5/27/16.
 */

class HelloTask implements Runnable {
    public void run() {
        for (int i=0; i<1000; i++) {
            System.out.println("aaaaa");
        }
    }
}

class HelloTask2 implements Runnable {
    public void run() {
        for (int i=0; i<1000; i++) {
            System.out.println("bbbbbb");
        }
    }
}

public class C4_test_2 {
    public static void main(String[] args) {
        Runnable task = new HelloTask();
        Runnable task2 = new HelloTask2();

        Runnable task3 = () -> {};

        Thread t1 = new Thread(task);
        Thread t2 = new Thread(task2);

        t2.start();
        t1.start();
    }
}
